package com.drifter;

/**
 * Created by Aaron on 8/5/2014.
 */

import java.util.ArrayList;

public class MapCell {
    private final Map map;
    private Map.TileEnum tileType;
    private ArrayList<Entity> entities;
    private final int x;
    private final int y;

    public MapCell(Map map, int x, int y) {
        this(map, x, y, Map.TileEnum.MARTIANSOIL);
    }

    public MapCell(Map map, int x, int y, Map.TileEnum tileType) {
        this.map = map;
        this.tileType = tileType;
        this.entities = new ArrayList<Entity>();
        this.x = x;
        this.y = y;
    }

    public Map.TileEnum getTileType ( ) {
        return this.tileType;
    }

    public void setTileType (Map.TileEnum tileType) {
        this.tileType = tileType;
    }

    public ArrayList<Entity> getEntities ( ) {
        return this.entities;
    }

    public void addEntity (Entity entity) {
        this.entities.add(entity);
    }

    public void removeEntity (Entity entity) {
        this.entities.remove(entity);
    }

    public int getX() {
        return this.x;
    }

    public int getY() {
        return this.y;
    }
}